<template>
  <div class="page">
    <div class="title">营销活动详情</div>
    <div class="content">
      <div class="infoContent">
        <div class="info-item">
          <div class="info-label">活动名称：</div>
          <div class="info-value">{{ marketingActivityInfo.activityName }}</div>
        </div>
        <div class="info-item">
          <div class="info-label">活动类型：</div>
          <div class="info-value">{{ marketingActivityInfo.activityType }}</div>
        </div>
        <div class="info-item">
          <div class="info-label">活动开始时间：</div>
          <div class="info-value">{{ marketingActivityInfo.activityBeginTime }}</div>
        </div>
        <div class="info-item">
          <div class="info-label">活动结束时间：</div>
          <div class="info-value">{{ marketingActivityInfo.activityEndTime }}</div>
        </div>
        <div class="info-item">
          <div class="info-label">活动权益：</div>
          <div class="info-value">{{ marketingActivityInfo.activityEquity }}</div>
        </div>
        <div class="info-item"></div>
        <div class="info-item">
          <div class="info-label">活动规则：</div>
          <div class="info-value">{{ marketingActivityInfo.activityRule }}</div>
        </div>
        <div class="info-item"></div>
        <div class="info-item">
          <div class="info-label">客户范围：</div>
          <div class="info-value">{{ marketingActivityInfo.activityRange }}</div>
        </div>
      </div>
      <div class="table">
        <vx-table :tableData="tableData" :columns="columns"> </vx-table>
      </div>
      <div class="footer">
        <ui-button class="default-btn" @click="back">返回</ui-button>
      </div>
    </div>
  </div>
</template>

<script>
import vxTable from '@/components/vx-table';
export default {
  name: 'marketingActivityQueryDetail',
  components: {
    vxTable,
  },
  data() {
    return {
      marketingActivityInfo: {},
      tableData: [],
      columns: [
        {
          label: '客户号',
          prop: 'customId',
        },
        {
          label: '客户名称',
          prop: 'customName',
        },
        {
          label: '归属机构',
          prop: 'affiliatedInstitution',
        },
      ],
    };
  },
  mounted() {
    this.marketingActivityInfo = JSON.parse(this.$route.query.marketingActivityInfo);
  },
  methods: {
    back() {
      this.$router.back();
    },
  },
};
</script>

<style lang="scss" scoped>
.page {
  .title {
    font-size: 18px;
    color: #000;
    font-weight: bold;
  }
  .content {
    background: #fff;
    padding: 20px;
    margin-top: 20px;
    // display: flex;
    // align-items: center;
    // justify-content: center;
    .infoContent {
      margin: 0 auto;
      margin-top: 50px;
      width: 50%;
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      .info-item {
        width: 50%;
        display: flex;
        align-items: center;
        .info-label {
          width: 120px;
          text-align: right;
        }
        div {
          font-size: 14px;
        }
        margin-bottom: 40px;
      }
    }
    .table {
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0 15%;
    }
    .footer {
      margin-top: 80px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
  }
}
</style>